package pattern.behavioral.command.simple;

/**
 * @author: chaoyang.ren  
 * @date:Jun 9, 2017  
 * @time:11:16:45 AM   
 * @email:chaoyang.ren@foxmail.com  
 * @version: 1.0
 */
public class LightOnCommand implements Command {

	private Light light;
	
	public LightOnCommand(Light light){
		this.light = light;
	}
	
	public void execute() {
		light.lightOn();
	}

	public void cancel() {
		light.lightOff();
	}

	public Light getLight() {
		return light;
	}

	public void setLight(Light light) {
		this.light = light;
	}

}

